package com.wangjialu.learner.consumer.controller;

import com.wangjialu.learner.consumer.service.PaymentFeignService;
import com.wangjialu.learner.payment.entities.Payment;
import com.wangjialu.learner.payment.vo.CommonResult;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <p></p>
 *
 * @author WangJialu
 * @since 2021/6/23 16:27
 */
@RestController
@Slf4j
public class OrderFeignController {
    @Resource
    private PaymentFeignService paymentFeignService;

    @GetMapping("/consumer/getPaymentById/{id}")
    public CommonResult<Payment> getPaymentById(@PathVariable("id")Long id) {
        return paymentFeignService.getById(id);
    }
}
